const seq = require('../db_connect'),
      { STRING, INT, TEXT, DECIMAL } = require('../../configs/db_type');

const AgencyInfo = seq.define('agency_info', {
  logoUrl: {
    comment: 'The logo image url',
    type: STRING,
    allowNull: false
  },
  name: {
    comment: 'Agency name',
    type: STRING,
    allowNull: false
  },
  feedbackRate: {
    comment: 'Feedback rate', //好评率
    type: INT,
    allowNull: false
  },
  studentCount: {
    comment: 'Student total count',
    type: STRING,
    allowNull: false
  },
  description: {
    comment: 'Agency slogan',
    type: STRING,
    allowNull: false
  },
  qqLink: {
    comment: 'QQ infomation link',
    type: STRING,
    allowNull: false
  },
  logoKey: {
    comment: 'Qiniu logo image name',
    type: STRING,
    allowNull: false
  },
  status: {
    comment: 'agency_info_status', //控制是否显示
    type: INT,
    defaultValue: 1,
    allowNull: true //设初始值要同时设置非空
  }
})

module.exports = AgencyInfo;